package 线程池.阻塞队列;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2023/8/15 11:17
 * @description:
 * @version:
 */
public class Task {
    private int taskId;

    Task(int taskId) {
        this.taskId = taskId;
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        this.taskId = taskId;
    }

    public void execute() {
        // 执行任务的逻辑
        System.out.println("Task " + taskId + " is executed by " + Thread.currentThread().getName());
    }
}
